| Fully Qualified Name: | CodeIgniter\Test\CIUnitTestCase |
| Extends: | TestCase |
PHPunit test case.
| Name | Description | Defined By |
|---|---|---|
| assertCloseEnough() | Custom function to test that two values are "close enough". | CIUnitTestCase |
| assertCloseEnoughString() | Custom function to test that two values are "close enough". | CIUnitTestCase |
| assertEventTriggered() | Hooks into CodeIgniter's Events system to check if a specific event was triggered or not. | CIUnitTestCase |
| assertHeaderEmitted() | Hooks into xdebug's headers capture, looking for a specific header emitted | CIUnitTestCase |
| assertHeaderNotEmitted() | Hooks into xdebug's headers capture, looking for a specific header emitted | CIUnitTestCase |
| assertLogged() | Custom function to hook into CodeIgniter's Logging mechanism to check if certain messages were logged during code execution. | CIUnitTestCase |
Custom function to test that two values are "close enough".
This is intended for extended execution time testing, where the result is close but not exactly equal to the expected time, for reasons beyond our control.
| Parameter Name | Type | Description |
|---|---|---|
| $expected | int | |
| $actual | mixed | |
| $message | string | |
| $tolerance | int |
Returns:
Custom function to test that two values are "close enough".
This is intended for extended execution time testing, where the result is close but not exactly equal to the expected time, for reasons beyond our control.
| Parameter Name | Type | Description |
|---|---|---|
| $expected | mixed | |
| $actual | mixed | |
| $message | string | |
| $tolerance | int |
Returns: bool
Hooks into CodeIgniter's Events system to check if a specific event was triggered or not.
| Parameter Name | Type | Description |
|---|---|---|
| $eventName | string |
Returns: bool
Hooks into xdebug's headers capture, looking for a specific header emitted
| Parameter Name | Type | Description |
|---|---|---|
| $header | string | The |
| $ignoreCase | bool |
Returns:
Hooks into xdebug's headers capture, looking for a specific header emitted
| Parameter Name | Type | Description |
|---|---|---|
| $header | string | The |
| $ignoreCase | bool |
Returns:
Custom function to hook into CodeIgniter's Logging mechanism to check if certain messages were logged during code execution.
| Parameter Name | Type | Description |
|---|---|---|
| $level | string | |
| $expectedMessage | null |
Returns: bool